Imports ccapps.persistent
Imports System.IO

Public Class logout
    Inherits [lib].BasePage

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here

        'Try
        '    Dim sw2 As System.IO.StreamWriter
        '    sw2 = File.AppendText(GlobalVar.root & "DbConnLog\logout" & "_" & Now.Today.ToString("yyyyMMdd") & ".txt")
        '    sw2.WriteLine(Session.SessionID & "logout oldu")
        '    sw2.Flush()
        '    sw2.Close()
        '    sw2 = Nothing
        'Catch ex As Exception
        '    Dim sw3 As System.IO.StreamWriter
        '    sw3 = File.AppendText("c:\logout_error_" & Now.Today.ToString("yyyyMMdd") & ".txt")
        '    sw3.WriteLine(ex.Message)
        '    sw3.Flush()
        '    sw3.Close()
        '    sw3 = Nothing
        'End Try       

        authorization.Set_Logout(Session("user"), Session.SessionID)
        'Dim sw1 As System.IO.StreamWriter
        'sw1 = File.AppendText(GlobalVar.root & "DbConnLog\" & Session("user") & "_" & Now.Today.ToString("yyyyMMdd") & ".txt")
        'sw1.WriteLine(Session.SessionID & "  update oldu")
        'sw1.Flush()
        'sw1.Close()
        'sw1 = Nothing
        Session.Abandon()
        Response.Redirect("/ccapps/web/menu/logout.aspx")

        'Response.Redirect("/ccapps/login.aspx")
    End Sub

End Class
